;;;
;;;
;;;	Author:	Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;		http://paracadd.com
;;;		All rights reserved.
;;;
;;;		COPYRIGHT: 
;;;		   EDITED: 
;;;
(DEFUN C:PLDIR ( / );pldir_ss)
  (SETQ pldir_ss (SSGET '((-4 . "<OR")(0 . "LWPOLYLINE")(0 . "POLYLINE")(-4 . "OR>"))))
  (IF pldir_ss
    (PROGN
      (SETQ hwplcnt 0
            lwplcnt 0
            allcnt  0
            hwdir_ss (SSADD)
            lwdir_ss (SSADD)
            all_vertex_lists NIL
      )
      (WHILE (< allcnt (SSLENGTH pldir_ss))
        (SETQ this_plname (SSNAME pldir_ss allcnt)
              this_plenty (ENTGET this_plname)
              this_pltype (CDR (ASSOC 0 this_plenty))
              next_plname this_plname
              vertex_list NIL
        )
        (IF (EQ this_pltype "POLYLINE")
          (PROGN
            (SETQ hwplcnt (1+ hwplcnt))
;;;            (SSADD this_plname hwdir_ss)
            (WHILE (/= "SEQEND" (CDR (ASSOC 0 (SETQ this_plenty (ENTGET (ENTNEXT this_plname))))))
              (SETQ vertex_list (APPEND vertex_list (LIST (CDR (ASSOC 10 this_plenty))))
                    this_plname (CDR (ASSOC -1 this_plenty))
              )
            )
            (SETQ all_vertex_lists (APPEND all_vertex_lists (LIST vertex_list)))
          )
          (PROGN
            (SETQ lwplcnt (1+ lwplcnt)
                  lwplent (ENTGET this_plname)
            )
            (WHILE (SETQ this_assoc10 (MEMBER (ASSOC 10 lwplent)lwplent))
              (SETQ vertex_list (APPEND vertex_list (LIST (CDAR this_assoc10)))
                    lwplent (CDR this_assoc10)
              )
            )
            (SETQ all_vertex_lists (APPEND all_vertex_lists (LIST vertex_list)))
          )
        )
        (SETQ allcnt (1+ allcnt))
      )
      (FOREACH n all_vertex_lists
        (FOREACH o n
          (IF (>= (LENGTH (SETQ this_dir (MEMBER o n))) 2)
            (PROGN
              (SETQ dirpt_0 (CADR this_dir)
                    dirpt_1 (POLAR dirpt_0 (+(ANGLE (CAR this_dir)(CADR this_dir))(* PI 0.8333))(*(getvar "viewsize")0.015))
                    dirpt_2 (POLAR dirpt_0 (-(ANGLE (CAR this_dir)(CADR this_dir))(* PI 0.8333))(*(getvar "viewsize")0.015))
              )
              (GRDRAW dirpt_0 dirpt_1 1 0)
              (GRDRAW dirpt_0 dirpt_2 1 0)
            )
          )
        )
      )
    )
  )
  (PRINC)
)